package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IPrepaidVipDao;
import com.jemmyee.pizza.entity.PrepaidVip;

@Repository("prepaidVipService")
public class PrepaidVipServiceImpl implements IPrepaidVipService<PrepaidVip>{

	@Autowired
	private IPrepaidVipDao prepaidVipDao ;
	
	public void delete(PrepaidVip entity) {
		prepaidVipDao.delete(entity);
	}

	public void deleteAll(List<PrepaidVip> list) {
		prepaidVipDao.deleteAll(list);
	}

	public void deleteById(Serializable id) {
		prepaidVipDao.deleteById(id) ;
	}

	public List<PrepaidVip> findAll() {
		return prepaidVipDao.findAll(new PrepaidVip());
	}

	public List<PrepaidVip> findByCriteria(DetachedCriteria criteria) {
		return prepaidVipDao.findByCriteria(criteria);
	}

	public PrepaidVip findById(Serializable id) {
		return prepaidVipDao.findById(id);
	}

	public List<PrepaidVip> findByProperty(String propertyName, Object value) {
		return prepaidVipDao.findByProperty(new PrepaidVip(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex, String order) {
		return prepaidVipDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public void save(PrepaidVip entity) {
		prepaidVipDao.save(entity) ;
	}

	public void update(PrepaidVip entity) {
		prepaidVipDao.update(entity) ;
	}

}
